Optimal. Leaf size=224 \[ \frac{x \left (\frac{-2 c e (a e+b d)+b^2 e^2+2 c^2 d^2}{\sqrt{b^2-4 a c}}-b e^2+2 c d e\right ) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b-\sqrt{b^2-4 a c}}\right )}{c \left (b-\sqrt{b^2-4 a c}\right )}+\frac{x \left (-\frac{-2 c e (a e+b d)+b^2 e^2+2 c^2 d^2}{\sqrt{b^2-4 a c}}-b e^2+2 c d e\right ) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}}\right )}{c \left (\sqrt{b^2-4 a c}+b\right )}+\frac{e^2 x}{c} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.475921, antiderivative size = 224, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 3, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.115, Rules used = {1424, 1422, 245} \[ \frac{x \left (\frac{-2 c e (a e+b d)+b^2 e^2+2 c^2 d^2}{\sqrt{b^2-4 a c}}-b e^2+2 c d e\right ) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b-\sqrt{b^2-4 a c}}\right )}{c \left (b-\sqrt{b^2-4 a c}\right )}+\frac{x \left (-\frac{-2 c e (a e+b d)+b^2 e^2+2 c^2 d^2}{\sqrt{b^2-4 a c}}-b e^2+2 c d e\right ) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}}\right )}{c \left (\sqrt{b^2-4 a c}+b\right )}+\frac{e^2 x}{c} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1424
Rule 1422
Rule 245
Rubi steps
\begin{align*} \int \frac{\left (d+e x^n\right )^2}{a+b x^n+c x^{2 n}} \, dx &=\int \left (\frac{e^2}{c}+\frac{c d^2-a e^2+\left (2 c d e-b e^2\right ) x^n}{c \left (a+b x^n+c x^{2 n}\right )}\right ) \, dx\\ &=\frac{e^2 x}{c}+\frac{\int \frac{c d^2-a e^2+\left (2 c d e-b e^2\right ) x^n}{a+b x^n+c x^{2 n}} \, dx}{c}\\ &=\frac{e^2 x}{c}+\frac{\left (2 c d e-b e^2-\frac{2 c^2 d^2+b^2 e^2-2 c e (b d+a e)}{\sqrt{b^2-4 a c}}\right ) \int \frac{1}{\frac{b}{2}+\frac{1}{2} \sqrt{b^2-4 a c}+c x^n} \, dx}{2 c}+\frac{\left (2 c d e-b e^2+\frac{2 c^2 d^2+b^2 e^2-2 c e (b d+a e)}{\sqrt{b^2-4 a c}}\right ) \int \frac{1}{\frac{b}{2}-\frac{1}{2} \sqrt{b^2-4 a c}+c x^n} \, dx}{2 c}\\ &=\frac{e^2 x}{c}+\frac{\left (2 c d e-b e^2+\frac{2 c^2 d^2+b^2 e^2-2 c e (b d+a e)}{\sqrt{b^2-4 a c}}\right ) x \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b-\sqrt{b^2-4 a c}}\right )}{c \left (b-\sqrt{b^2-4 a c}\right )}+\frac{\left (2 c d e-b e^2-\frac{2 c^2 d^2+b^2 e^2-2 c e (b d+a e)}{\sqrt{b^2-4 a c}}\right ) x \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}}\right )}{c \left (b+\sqrt{b^2-4 a c}\right )}\\ \end{align*}
Mathematica [A] time = 0.531575, size = 216, normalized size = 0.96 \[ \frac{x \left (\frac{\left (\frac{-2 c e (a e+b d)+b^2 e^2+2 c^2 d^2}{\sqrt{b^2-4 a c}}-b e^2+2 c d e\right ) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};\frac{2 c x^n}{\sqrt{b^2-4 a c}-b}\right )}{b-\sqrt{b^2-4 a c}}+\frac{\left (-\frac{-2 c e (a e+b d)+b^2 e^2+2 c^2 d^2}{\sqrt{b^2-4 a c}}-b e^2+2 c d e\right ) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}}\right )}{\sqrt{b^2-4 a c}+b}+e^2\right )}{c} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.036, size = 0, normalized size = 0. \begin{align*} \int{\frac{ \left ( d+e{x}^{n} \right ) ^{2}}{a+b{x}^{n}+c{x}^{2\,n}}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \frac{e^{2} x}{c} - \int -\frac{c d^{2} - a e^{2} +{\left (2 \, c d e - b e^{2}\right )} x^{n}}{c^{2} x^{2 \, n} + b c x^{n} + a c}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{e^{2} x^{2 \, n} + 2 \, d e x^{n} + d^{2}}{c x^{2 \, n} + b x^{n} + a}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (d + e x^{n}\right )^{2}}{a + b x^{n} + c x^{2 n}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (e x^{n} + d\right )}^{2}}{c x^{2 \, n} + b x^{n} + a}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]